<?php
require_once PATH_SITE.'cn/royan/php/utils/writers/AbstractWriter.abstract.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of WriterError
 *
 * @author yanr
 */
class WriterEvent extends AbstractWriter
{
    //put your code here
    public function __construct( $value )
    {
        $this->object = $value;
    }
    
    public function write()
    {
        $value['event']     = $this->object->__get("event");
        $value["code"]      = $this->object->__get("code");
        $value["target"]    = $this->object->__get("target");
        $value["data"]      = $this->object->__get("data");
        
        RETURN json_encode($value);
    }
}

?>
